
/*
 * @Author: yanjinzhong
 * @Date: 2021-04-13 01:16:51
 * @Description: file content
 */
import {toRaw} from 'vue'
import {useCrud} from './useCrud'
const {handleCreate,handleRead,handleUpdate,handleDelete} = useCrud()

const crud = (data:any) => {
  const item = toRaw(data.record)
  return (
    <>
      <a-button onClick={() => handleCreate(data,item)}>查看</a-button>
      <a-button onClick={() => handleUpdate(data.update,item)}>编辑</a-button>
      <a-button onClick={() => handleDelete(data.delete,item)}>删除</a-button>
    </>
  )
}
export default crud